from common.config import torqueConfig as Config
# from torqueSrc.tools.loadFile import loadfile, toAttrCsv
from torqueSrc.tools.loadFile import toAttrCsv
from toolsSrc.files.loadFiles import loadfile

import pandas as pd

# @CleanDecorator.drop_duplicates
# @CleanDecorator.drop_bigorsmall
#@CleanDecorator.drop_dbscan
def initDataProcess(X):
    return X


def toCsv():
    columsList = [Config.WindSpeed, Config.ActPower, Config.RotateSpeed]
    X = loadfile(Config.historyDataRoot, columsList)  # 读取Cofnig().historyDataRoot目录下的所有数据文件
    X = X[columsList]
    X.to_csv(Config.hisInitialData, index=False)

def initData():
    toCsv()
    toAttrCsv(Config.hisInitialData, Config.hisInitialDataAttr)
    print('initialDataProcess 完毕................')
    # show3dFig(Config.hisInitialData)
if __name__ == '__main__':

    initData()